using System;
using System.Threading;

namespace ThreadingIssues
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Hello, World!");
            RaceConditions();
            Console.ReadLine();
        }

        public static void RaceConditions()
        {
            var state = new StateObject();
            for (int i = 0; i < 4; i++)
            {
                Task.Run(() => new SimpleTask().RaceCondition(state));
            }
        }
    }

}
